package iu.test;

import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import utils.LogTest;

/**
 * Created by Olga on 09.06.2014.
 */
public class NegativeTestNonCompare extends CommonTestSteps {

    @DataProvider
    public Object[][] products() {
        return new Object[][]{
                new Object[]{"ECCO 242683(01163) 41", "CASIO LDF-30-4AEF"}

        };
    }


    @Test(dataProvider = "products")
    public void productComparison(String product1, String product2) {
        LogTest.info("-----------Non Comparable Test Started");
        searchProduct(product1);
        addToComparison();
        searchProduct(product2);
        addToComparison();
        comparisonNotWorks(product1, product2);
    }

    public void comparisonNotWorks(String prod1, String prod2) {
        page.waitToCompare();
        page.gotoComparison();
        Assert.assertFalse(page.checkComparison(prod1), prod1 + " and " + prod2 + " are fom different catalogs");
    }
}
